package zh.codegym.task.task04.task0425;

/* 
目标已锁定！
*/

import java.io.*;
import java.util.Scanner;

public class Solution {
    public static void main(String[] args) throws Exception {
        //在此编写你的代码
        //在此编写你的代码
        Scanner scanner = new Scanner(System.in);

        int number1 = scanner.nextInt();
        int number2 = scanner.nextInt();

        if(number1 < 0){

            if(number2 < 0){
                System.out.println(3);
            }else {
                System.out.println(2);
            }

        }else {

            if(number2 < 0){
                System.out.println(4);
            }else {
                System.out.println(1);
            }

        }
    }
}
